package com.jming.jike.dto.backend;

import com.jming.jike.common.ValidatorGroup.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author jinming.zhang
 * @version 0.0.1
 * @date 2022/04/25
 */
@Data
public class LoginDTO {

    @ApiModelProperty("用户名")
    @NotBlank(message = "用户名不能为空", groups = {Query.class})
    private String userName;

    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空", groups = {Query.class})
    @Pattern(regexp = "^[a-zA-Z]\\w{5,17}$", message = "密码格式不正确!", groups = {Query.class})
    private String password;

}
